void
script_parser()
{
	const int buf_size = 1024;
	const char *file_path = "script";

	int i;
	char *buf;
	FILE *fp;
	script_dict script;

	if( fp = fopen( file_path , "r" ) ) {

		while( fgets( buf, buf_size, fp )) {
			script = parse_script(buf);

			script.script_exec(script_elem);
		}
	}

	fclose(fp);
}

script_dict 
parse_script( const char *script_line )
{
	int i, script_count = 0;
	char *mode = '\0';
	
	if( sscanf( script_line, "%d:%s" , script.tsc, script.script_elem ) == 0)
		printf("parsing error\n");

	return script_dict;
}

void
script_write( const void *value )
{
	char *str_mem_addr = strtok( value, ":" );
	char *str_value = strtok( str_mem_addr, ":" );

	int mem_addr = atoi(str_mem_addr);
	int value = atoi(str_value);


}

void
script_read( const void *value )
{
	char *str_mem_addr = strtok( value, ":" );
	char *str_register = strtok( str_mem_addr, ":" );

	int mem_addr = atoi(str_mem_addr);
	int registers = atoi(str_registers);


}

void
script_device( const void *value )
{
	char *str_device_num = strtok( value, ":" );
	int device_num = atoi(str_device_num);

}